package com.wudl.flink.analysis

import org.apache.flink.streaming.api.TimeCharacteristic
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment

// 自定义输入数据的样例类

case class UserBehavior(userId: Long, itemId: Long, categoryId: Int, behavior: String, timestamp: Long)
// 定义窗口聚合的样例类
case class ItemViewCount(itemId:Long,windowsEnd:Long,count:Long)

object HotItems {
  def main(args: Array[String]): Unit = {

    val env = StreamExecutionEnvironment.getExecutionEnvironment
    env.setParallelism(1)
    // 定义事件时间语义
    env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime)


  }

}
